export interface ILoginState {
  token: string
  userInfo: any
  userMenus: any
  permissions: string[]
}

//token & userId
export interface ILoginResult {
  id: number
  name: string
  token: string
}

//Data
// export interface IDataType<T = any> {
//   code: number
//   data: T
// }

//userInfo
// export interface IUserInfoResult {
//   id: number
//   name: string
//   realname: string
//   cellphone: number
//   enable: number
//   createAt: number
//   updateAt
// }

export interface Role {
  id: number
  name: string
  intro: string
  createAt: Date
  updateAt: Date
}

export interface Department {
  id: number
  name: string
  parentId?: any
  createAt: Date
  updateAt: Date
  leader: string
}

export interface IUserInfoResult {
  id: number
  name: string
  realname: string
  cellphone: number
  enable: number
  createAt: Date
  updateAt: Date
  role: Role
  department: Department
}

export interface Child2 {
  id: number
  url?: any
  name: string
  sort?: any
  type: number
  parentId: number
  permission: string
}

export interface Child {
  id: number
  url: string
  name: string
  sort: number
  type: number
  children: Child2[]
  parentId: number
}

export interface IUserMenusResult {
  id: number
  name: string
  type: number
  url: string
  icon?: string
  sort: number
  children: Child[]
}
